import threading

class ThreadSafeDict(dict):

    def __init__(self):
        super().__init__()
        self._lock = threading.Lock()

    def get(self, key):
        with self._lock:
            print('get', key)

    def set(self, key, value):
        with self._lock:
            print('set', key, value)

    def delete(self, key):
        with self._lock:
            print('delete', key)
